Answer:

See below:

Complete, Improved Program

Here is the complete program. Study it so that you are clear how the "big" program is made up of "little" sub-programs that are fit together with control structures. This is possibly the most important idea in programming. As part of your study, you will want to copy this program into QBasic and run it a few times.

' Get the starting balance 
PRINT "What is the starting balance"
INPUT BALANCE
LET QUIT$ = "N"
DO WHILE QUIT$ = "N" 

  'Handle one transaction
  ' Determine transaction type  
  PRINT "Type a 'D' for a deposit or a 'C' for a check"
  INPUT TYPE$
  '
  IF TYPE$ = "D" THEN
    ' Process a deposit. 
    PRINT "What is the deposit amount"
    INPUT DEPOSIT
    LET BALANCE = BALANCE + DEPOSIT
  ELSE
    ' Process a check. 
    PRINT "What is the check amount"
    INPUT CHECK
    LET BALANCE = BALANCE - CHECK
  END IF
  ' Print the new balance. 
  PRINT "The new balance is", BALANCE

  PRINT "Do you want to quit? Y or N"
  READ QUIT$ 
LOOP
'
END

QUESTION 22:

Could this program be made part of a large financial application that handles savings accounts and checking accounts?